package com.ruoyi.common.core.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ruoyi.common.core.domain.entity.Message;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.Map;

/**
 * 用户消息Mapper接口
 * @date 2024-03-22
 */
@Repository
public interface MessageMapper extends BaseMapper<Message> {
    IPage<Map<String, Object>> selectPage(IPage<?> page, @Param("p") Map<String, Object> param);

    void updateUserRead(@Param("userId") Long userId);

    Long getUnReadMessageCount(@Param("userId") Long userId);
}
